<%@ page contentType="text/html;charset=UTF-8"%>
<%@ page import="com.ejoysoft.etable.business.MenuType,
				 com.ejoysoft.common.Constants,
				 com.ejoysoft.util.ParamUtil"%>
<%@ include file="../include/jsp/head.jsp"%>
<%
    MenuType obj=new MenuType(globa,true);
    String strUrl="menutype_list.jsp";
    if(action.equals(Constants.DELETE_STR)){
    	String[] aryStrId = ParamUtil.getStrArray(request, "strId");
    	for (int i = 0; i < aryStrId.length; i++) {
	    	obj.delete("where strId ='"+aryStrId[i]+"'");
    	}
    	globa.dispatch(true, strUrl);
	} else {
	    if(action.equals(Constants.ADD_STR)) {
		    globa.dispatch(obj.add(), strUrl);
		}else if(action.equals(Constants.UPDATE_STR)){
		    globa.dispatch(obj.update(obj.getStrId()),strUrl);
		}
	}
    //关闭数据库连接对象
    globa.closeCon();
%>